unit FModel;

interface
uses
	FOpenGl, FLoader, FFPS, FTerrain, FFrustum;

procedure DrawModel();

implementation
uses
	FBase;

procedure DrawModel();
begin
	if SphereInFrustum(38.5 * TileSize, 40.5 * TileSize, 0, 0.7071 * TileSize) then begin
		glPushMatrix();
		glTranslatef(TileSize * 38.5, TileSize * 40.5, 0);
		LoadedModel.DisplayModel(Count.New, 1, 38.5 * TileSize, 40.5 * TileSize, 0);
		glPopMatrix();

		glLoadName(glNameCount);
		Inc(glNameCount);
	end;

	if SphereInFrustum(42.5 * TileSize, 40.5 * TileSize, 0, 0.7071 * TileSize) then begin
		glPushMatrix();
		glTranslatef(TileSize * 42.5, TileSize * 40.5, 0);
		glRotatef(-90, 0, 0, 1);
		LoadedModel.DisplayModel(Count.New, 1, 42.5 * TileSize, 40.5 * TileSize, 0);
		glPopMatrix();

		glLoadName(glNameCount);
		Inc(glNameCount);
	end;


end;

end.

